﻿
namespace OpenComposite.HumanActivity.Contracts.Participants
{
	public class ActivityParticipant : IParticipant
	{
		#region Initialization
		public ActivityParticipant()
		{

		}
		public ActivityParticipant(string activityName)
		{
			this.ActivityName = activityName;
		}
		#endregion

		#region Public Properties
		public string ActivityName { get; set; }
		#endregion

		#region IParticipant Members

		public int ID
		{
			get { return -1; }
		}

		public string Display
		{
			get { return this.ActivityName; }
		}

		public ParticipantType ParticipantType
		{
			get { return ParticipantType.ActivityUser; }
		}

		#endregion

		#region IEquatable<IParticipant> Members

		public bool Equals(IParticipant other)
		{
			ActivityParticipant otheract = other as ActivityParticipant;
			if ( otheract != null ) {
				return ( otheract.ActivityName == this.ActivityName );
			}
			return false;
		}

		#endregion
	}
}
